package co.com.ticci.mb.general;

import javax.faces.context.FacesContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class Utilidades 
{
	public static HttpSession getSession()
	{
		FacesContext context = FacesContext.getCurrentInstance();
		
		return (HttpSession) context.getExternalContext().getSession(true);
	}
	
	public static HttpServletRequest getRequest()
	{
		FacesContext context = FacesContext.getCurrentInstance();
		
		return (HttpServletRequest) context.getExternalContext().getRequest();
	}
	
	public static FacesContext getFacesContext()
	{
		return FacesContext.getCurrentInstance();
	}
	
//	public void agregarMensaje(String titulo,String mensaje,String tipo)
//	{		 
//		new FacesMessage(, summary, detail)
//		FacesContext context = FacesContext.getCurrentInstance();
//		
//	}
}
